import request from '@/utils/request';
import { base, article } from '@/types';

// tag
export const findAllTagsApi = (params: base) => {
  return request.post('/blogTag/findBlogTag', {
    ...params,
  });
};

export const addBlogTagApi = () => {
  return request.post('/blogTag/addBlogTag', {});
};

// childTag
export const findAllchildTagsApi = (params: base) => {
  return request.post('/blogChildTag/findBlogTag', {
    ...params,
  });
};

// 写文章
export const addArticleApi = (params: article) => {
  return request.post('/blogArticle/addBlogArticle', {
    ...params,
  });
};

// 查询文章
export const findArticleApi = (params: base) => {
  return request.post('/blogArticle/findBlogArticle', {
    ...params,
  });
};
